package Decorator;

import Compoent.AComponent;

abstract public class ADecorator extends Compoent.AComponent {
    private AComponent AComponent;
    public AComponent getComponent() {
        return AComponent;
    }

    public void setComponent(AComponent AComponent) {
        this.AComponent = AComponent;
    }

    public ADecorator(AComponent AComponent) {
        this.AComponent = AComponent;
    }

    @Override
    public void display() {
        if (AComponent != null) {
            AComponent.display();
        }
    }
}
